<?php
require("php/config.php");
require("php/postgres.php");

try {

	if (!empty($_GET["email"]) && !empty($_GET["assunto"]) && !empty($_GET["coment"])) {
		
		$confs = $GLOBALS["CONFIGS"]["PSQL_DB"];
		$pgcon = new PostgresConnection($confs["HOST"], $confs["PORT"], $confs["USER"], $confs["PASSWORD"], $confs["DATABASE"]);
		
		if ($pgcon->faleConosco($_GET)) {
		
			die("0");	
		} else {
			
			die("1");
		}
	}
} catch (PostgresConnectionException $pce) {
	//Nothing
}
echo 1;
?>